package com.ukao.cashregister.adapter;

import android.content.Context;
import android.widget.TextView;

import com.mcxtzhang.commonadapter.rv.CommonAdapter;
import com.mcxtzhang.commonadapter.rv.ViewHolder;
import com.ukao.cashregister.R;
import com.ukao.cashregister.bean.SummaryBean;
import com.ukao.cashregister.utils.CheckUtils;

import java.util.List;

/**
 * Created by ukaodev on 2017/6/14.
 */

public class StatisticDetailsAdapter extends CommonAdapter<SummaryBean.PayListBean> {



    public StatisticDetailsAdapter(Context context, List<SummaryBean.PayListBean> datas) {
        super(context, datas, R.layout.adapter_statistic_details);
    }


    @Override
    public void convert(final ViewHolder holder, final SummaryBean.PayListBean item) {

        TextView payMethodText = holder.getView(R.id.payMethodText);
        TextView amount = holder.getView(R.id.amount);
        payMethodText.setText(item.getPayMethodText());
        amount.setText("￥"+CheckUtils.isEmptyNumber(item.getAmount()));

    }

}
